import java.util.Locale;
import java.util.function.Consumer;

/**
 * @ClassName Demo04
 * @Description TODO
 * @Author Li
 * @Date 2022/8/14 15:10
 * @ModifyDate 2022/8/14 15:10
 * @Version 1.0
 */
public class Demo04 {
    private static void consumeString(Consumer<String> c1, Consumer<String> c2) {
        c1.andThen(c2).accept("Hello");
    }

    public static void main(String[] args) {
        consumeString(
                s -> System.out.println(s.toUpperCase(Locale.ROOT)),
                s -> System.out.println(s.toLowerCase(Locale.ROOT)));
    }
}
